<!DOCTYPE HTML>
<html>
<head>
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- SETTINGS -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <title>Bet on chope, sell your friend!</title>
    <meta http-equiv="Content-Language" content="fr">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta name="description" LANG="en" content="Celibax is an online betting system. It will be possible to bet on anything with your friends.
            It was initially designed to bet on which of your friends would be the first to get laid, but you can also use it for sporting events, life events or whatever you can think of!
            You cannot play real money here, the Celibax money is the Chochoro and the shame of losing!">
    <meta name="robots" content="index, follow">
    <meta name="Revisit-after" content="10 days">
    <meta name="Date-Creation-yyyymmdd" content="20071216">
    <meta name="Date-Revision-yyyymmdd" content="20110104">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="imagetoolbar" content="no">
    <meta http-equiv="expires" content="never">
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- LIB INCLUDES -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/jquery.min1.7.2.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/extendAjaxForCSRF.js"></script>
    <!-- the following include allow internet explorer to keep the same display than the other browser -->
    <!--[if lt IE 10]>
	    <script type="text/javascript" src="{{ STATIC_URL}}javascript/CSS3PIE.js"></script>
    <![endif]-->
    
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- STYLE AND PAGE STRUCTURE INCLUDES -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL}}css/structure.css">
    <script language="JavaScript" type="text/javascript" src="{{ STATIC_URL}}javascript/headerStructure.js"></script>

    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!--WIDGETS, GRAPHS AND CHARTS-->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!--To keep the number of connections to the server as low as possible, we will have only one request for all the tables and charts displaid in
    the website. This request will be a post request in order to avoid proxy caching. The return of this request will be a dictionnary of jsons.
    the entries for those jsons will be defined in each of the include ".js" but the internal content of them will be hard coded from the python source.
    We will then apply a displaying function to each of the returned json. 
    -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- We start by including a json collector which will gather all the require informations from the following includes.
    It Mostly defines the global allJsonsRegistry variable witch is a list of couple (func_name_in_py, func_name_in_js)
    the meaning of this couple is define in the next comment blocks-->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/allJsonsCollector.js"></script>

    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- now we set all the json we want. each include must register into the allJsonsRegistry variable:
    - The name func_name_in_py of the pyhon function it calls in the python server code to generate the json.
      This function is required to have a single argument which is the player sendind the request
    - The name func_name_in_js of the  function we will apply to the returned json
    it also need to implement the function whose name is func_name_in_js-->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/selectBetroom.js"></script>

    <!-- -------------------------------------------------------------------------------------------- -->
    <!--we then call the function dispatcher which will call the function func_in_py and apply the func_in_js to the json which is returned
    for all the charts/table which have been registered.-->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/allJsonsDispacher.js"></script>
    
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- INITIALISATION OF THE PAGE -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/coreOnLoad.js"></script>

</head>
<body>
    {% load argTemplates %}
    {% load binaryOPerationTemplateTag %}
    
    <!-- create the header-->
    <script language="JavaScript" type="text/javascript">makeHeader(
        'home',
        1,
        '{{user.username}}',
        '',
        0,//room type
        1,
        '{{STATIC_URL}}'
     );</script>
    <noscript> <p> Activez Javascript pour voir le menu !</p></noscript>
    
    <div class="section">
        <h2>Go and play</h2>
        <div class="myLeft">
            <div class="myLeft2">
                If you are a player of an existing bet room, you can pick it from the list:
                <select id="betroomToPlayDropList" onChange="goToSelectedBetroom('betroomToPlayDropList', '/market/');"></select>
            </div>
        </div>
    </div>
    <div class="section">
        <h2>Go and admin</h2>
        <div class="myLeft">
            <div class="myLeft2">
                If you are the administrator of an existing bet room, you can pick it from the list:
                <select id="betroomToAdminDropList" onChange="goToSelectedBetroom('betroomToAdminDropList', '/admin2/');"></select>
            </div>
        </div>
    </div>
    <div class="section">
        <h2>Join a betroom being launched</h2>
        <div class="myLeft style="display:table;">
            <div class="myLeft2 oneLine">
                If you have been provided with the appropriate password, you can enter any of the bet rooms listed in following drop down menu:
            </div>
            <div class="myLeft2 oneLine">
                You will be asked for your view on the bet. You will be notified when the bet starts.
            </div>
            <div class="myLeft2 oneLine">
                If you want to change the bet you have made before the bet room is launched, you can do it selecting the correct bet room from the list.
                <select id="betroomBeingLaunchedDropList" onChange="goToSelectedBetroom('betroomBeingLaunchedDropList', '/enterBetroom/step1/');"></select>
            </div>
        </div>
    </div>
    <div class="section">
        <h2>Create a new bet room</h2>
        <div class="myLeft onFullLines">
            <div class="myLeft oneLine">
                You can create a new bet room clicking <a href="/createBetroom/step1/">here</a>. 
            </div>
            <div class="myLeft oneLine">
                If you are already launching a bet room, it will bring you back to the pages where you will be able to resume the creation.
            </div>
        </div>
    </div>
        
    <div>
        <script language="JavaScript" type="text/javascript">footer()</script>
    </div>
</body>
</html>
